﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour {
    public static Player con;
    private void Awake()
    {
        con = this;
    }
    [Header("攻击力")]
    public int attack;

    private void OnCollisionEnter2D(Collision2D other)
    {
        EnemyPlantBullet bullet = other.gameObject.GetComponent<EnemyPlantBullet>();
        if (bullet!=null)
        {
            PlayerBloodController.con.SetBlood();
            PlayerController.con.PlayerHurt();
        }
    }

    // Use this for initialization
    void Start () {
        attack = KeepCoin.con.AttackValue;
	}
    // Update is called once per frame
    void Update () {
        KeepCoin.con.AttackValue = attack;
    }
}
